package com.hyacinth.web.ui.easyui.vo;

import java.util.ArrayList;
import java.util.List;

public class Tree {

	private Long id;
	
	private String text;
	
	private String state;
	
	private boolean checked;
	
	private Long pid;
	
	private List<Tree> children;
	
	public void addChildren(List<Tree> list) {
		if(children==null)
			children = new ArrayList<Tree>();
		children.addAll(list);
	}
	
	public Tree(Long id, String text, Long pid) {
		this.id = id;
		this.text = text;
		this.pid = pid;
	}

	public String getText() {
		return text;
	}

	public String getState() {
		return state;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setState(String state) {
		this.state = state;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public List<Tree> getChildren() {
		return children;
	}

	public void setChildren(List<Tree> children) {
		this.children = children;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}
}
